/* CSS Reset 和基础样式 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.5;
    height: 100%;
}

#root {
    height: 100%;
}

/* 代码字体 */
code {
    font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* 链接样式 */
a {
    color: inherit;
    text-decoration: none;
    background-color: transparent;
}

a:hover {
    color: #1890ff; /* Ant Design 主色 */
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5em;
    color: rgba(0, 0, 0, 0.85);
    font-weight: 500;
}

/* 段落样式 */
p {
    margin-top: 0;
    margin-bottom: 1em;
}

/* 列表样式 */
ol, ul {
    margin-top: 0;
    margin-bottom: 1em;
}

/* 图片样式 */
img {
    border-style: none;
    max-width: 100%;
    height: auto;
}

/* 表单元素样式 */
button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button, input {
    overflow: visible;
}

button, select {
    text-transform: none;
}

button, [type="button"], [type="reset"], [type="submit"] {
    -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

/* 表格样式 */
table {
    border-collapse: collapse;
}

/* 辅助类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.pull-left {
    float: left;
}

.pull-right {
    float: right;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.hidden {
    display: none !important;
}

.visible {
    display: block;
}

.invisible {
    visibility: hidden;
}

/* 响应式工具类 */
@media (max-width: 576px) {
    .hidden-xs {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hidden-sm {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .hidden-md {
        display: none !important;
    }
}

@media (max-width: 1200px) {
    .hidden-lg {
        display: none !important;
    }
}

/* 滚动条样式 (Webkit 浏览器) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 选择文本样式 */
::selection {
    background-color: #1890ff;
    color: white;
}

/* 焦点样式 */
:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    *,
    *::before,
    *::after {
        text-shadow: none !important;
        box-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    abbr[title]::after {
        content: " (" attr(title) ")";
    }

    pre {
        white-space: pre-wrap !important;
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}